package com.chaoxinxing.demo01.service;

import com.chaoxinxing.demo01.bean.Book;
import com.chaoxinxing.demo01.bean.BookBean;
import com.chaoxinxing.demo01.dao.CrudDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class CrudService {

  @Autowired
  private CrudDao crudDao ;


  public  String   insertServiceBook(BookBean bookBean){
   return   crudDao.insertDaoBook(bookBean) ;
  }


    public List<BookBean> selectAllBook( ) {
        return   crudDao.selectAllBook() ;
    }

    public String deleteBookById(String id) {

            return   crudDao.deleteBookById(id) ;
    }

    public String updateBook(BookBean bookBean) {
        return   crudDao.updateBook(bookBean) ;

    }

    public String insertServiceBook2(BookBean bookBean) {

        return   crudDao.insertDaoBook2(bookBean) ;

    }

    public String insertBook3(Book book) {
        return   crudDao.insertBook3(book) ;
    }
}
